POST
https://api.applivery.io/v1/organizations/{organizationId}/smart-attributes
curl -X POST "https://api.applivery.io/v1/organizations/{organizationId}/smart-attributes" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"segmentId": 0,
"exposeToChildren": true,
"name": "string",
"description": "string",
"output": {
"type": "string"
},
"input": {
"type": "constant",
"value": {},
"source": "constant"
}
}'const response = await fetch("https://api.applivery.io/v1/organizations/{organizationId}/smart-attributes", {
method: "POST",
headers: {
Authorization: "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json",
},
body: JSON.stringify({
"segmentId": 0,
"exposeToChildren": true,
"name": "string",
"description": "string",
"output": {
"type": "string"
},
"input": {
"type": "constant",
"value": {},
"source": "constant"
}
}),
});
const data = await response.json();import requests
response = requests.post(
"https://api.applivery.io/v1/organizations/{organizationId}/smart-attributes",
headers={"Authorization": "Bearer <YOUR_API_KEY>"},
json={
"segmentId": 0,
"exposeToChildren": true,
"name": "string",
"description": "string",
"output": {
"type": "string"
},
"input": {
"type": "constant",
"value": {},
"source": "constant"
}
},
)
data = response.json()Request
Send your API key in the request header
authorization
Example:
Authorization: Bearer <token>
organizationId
string
required
Body Params
application/json
segmentId
number
optional
exposeToChildren
any
optional
name
string
required
description
string
optional
output
object
required
type
string
required
input
object
required
type
string
required
value
object
required
admDevice
object
optional
aosDevice
object
optional
emmDevice
object
optional
winDevice
object
optional
source
string
required
field
object
optional
label
string
optional
description
string
optional
placeholder
string
optional
{
"segmentId": 0,
"exposeToChildren": true,
"name": "string",
"description": "string",
"output": {
"type": "string"
},
"input": {
"type": "constant",
"value": {
"admDevice": {
"value": "string"
},
"aosDevice": {
"value": "string"
},
"emmDevice": {
"value": "string"
},
"winDevice": {
"value": "string"
}
},
"source": "constant"
}
}
Responses
200 Response
application/json
status
boolean
required
data
object
required
id
string
required
organizationId
string
required
segmentId
number
optional
exposeToChildren
any
optional
name
string
required
description
string
optional
output
object
required
type
string
required
input
object
required
type
string
required
value
object
required
source
string
required
field
object
optional
loopTime
number
required
createdAt
string
required
updatedAt
string
required
version
number
optional
counts
object
optional
android
object
required
apple
object
required
windows
object
required
{
"status": true,
"data": {
"id": "string",
"organizationId": "string",
"segmentId": 0,
"exposeToChildren": true,
"name": "string",
"description": "string",
"output": {
"type": "string"
},
"input": {
"type": "constant",
"value": {
"admDevice": {
"value": "string"
},
"aosDevice": {
"value": "string"
},
"emmDevice": {
"value": "string"
},
"winDevice": {
"value": "string"
}
},
"source": "constant"
},
"createdAt": "string",
"updatedAt": "string",
"version": 0,
"counts": {
"android": {
"smartAttributeAssignments": 0,
"smartAttributeAssignmentsEnforced": 0
},
"apple": {
"smartAttributeAssignments": 0,
"smartAttributeAssignmentsEnforced": 0
},
"windows": {
"smartAttributeAssignments": 0,
"smartAttributeAssignmentsEnforced": 0
}
}
}
}
400 Response
application/json
status
boolean
optional
error
object
optional
code
number
optional
message
string
optional
{
"status": false,
"error": {
"code": 5221,
"message": "Unable to process smart attribute request"
}
}
401 Response
application/json
status
boolean
optional
error
object
optional
code
number
optional
message
string
optional
{
"status": false,
"error": {
"code": 4002,
"message": "No auth token"
}
}
404 Response
application/json
status
boolean
optional
error
object
optional
code
number
optional
message
string
optional
{
"status": false,
"error": {
"code": 3001,
"message": "Entity not found"
}
}